<?php namespace system\database\migrations;
use houdunwang\database\build\Migration;
use houdunwang\database\build\Blueprint;
use houdunwang\database\Schema;
class CreateArticleTable extends Migration {
    //执行
	public function up() {
		Schema::create( 'article', function ( Blueprint $table ) {
			$table->increments( 'arc_id' )->comment( '文章表主键' );
            $table->timestamps();
			$table->string( 'arc_title',100 )->comment( '文章标题' )->defaults('');
			$table->tinyInteger( 'arc_click', 100 )->comment( '文章点击次数' )->defaults(0);
			$table->text( 'arc_content', 50000 )->comment( '文章内容' )->defaults('');
			$table->text( 'arc_description', 1000 )->comment( '文章描述' )->defaults('');
			$table->string( 'arc_author', 100 )->comment( '文章作者' )->defaults('');
			$table->string( 'arc_linkurl', 100 )->comment( '文章外部链接' )->defaults('');
			$table->string( 'arc_source', 100 )->comment( '文章来源' )->defaults('');
			$table->tinyInteger( 'arc_ishot', 100 )->comment( '是否热门' )->defaults(0);
			$table->tinyInteger( 'arc_recommend	', 100 )->comment( '是否推荐' )->defaults(0);
			$table->tinyInteger( 'arc_sort', 100 )->comment( '文章排序' );
			$table->tinyInteger( 'cate_id', 100 )->comment( '栏目主键' )->defaults(0);
			$table->string( 'arc_keyword', 100 )->comment( '微信关键词' )->defaults('');

        });




    }

    //回滚
    public function down() {
        Schema::drop( 'article' );
    }
}